package cn.bone.server.common;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by superbone on 2017/3/27.
 */

@ConfigurationProperties(prefix = "superbone.globalParams")
@Component
public class GlobalParams {

    private String aesPass;

    private RedisParams redis;

    private MongoParams mongo;

    private MysqlParams mysql;

    public String getAesPass() {
        return aesPass;
    }

    public void setAesPass(String aesPass) {
        this.aesPass = aesPass;
    }

    public RedisParams getRedis() {
        return redis;
    }

    public void setRedis(RedisParams redis) {
        this.redis = redis;
    }

    public MongoParams getMongo() {
        return mongo;
    }

    public void setMongo(MongoParams mongo) {
        this.mongo = mongo;
    }

    public MysqlParams getMysql() {
        return mysql;
    }

    public void setMysql(MysqlParams mysql) {
        this.mysql = mysql;
    }

    public static class RedisParams{
        private String host;
        private int port;
        private String password;

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public int getPort() {
            return port;
        }

        public void setPort(int port) {
            this.port = port;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }
    }

    public static class MongoParams{
        private String url;
        private String dbName;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getDbName() {
            return dbName;
        }

        public void setDbName(String dbName) {
            this.dbName = dbName;
        }
    }

    public static class MysqlParams{
        private String url;
        private String username;
        private String password;
        private String driverClassName;

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getPassword() {
            return password;
        }

        public void setPassword(String password) {
            this.password = password;
        }

        public String getDriverClassName() {
            return driverClassName;
        }

        public void setDriverClassName(String driverClassName) {
            this.driverClassName = driverClassName;
        }
    }
}
